<?php
namespace app\serverfund\validate;
use \app\manage\validate\BaseValidate;
/**
 * @author:      李颖
 * @DateTime:    2017-08-31 11:17:56
 * @Description: 提现模块验证
 */
class Withdraw extends BaseValidate
{

    protected $rule = [
        'id' => ['integer', 'gt'=>0],
        'user_id' => ['integer', 'gt'=>0],
        'review_id' => ['integer', 'gt'=>0],
        'transfer_id' => ['integer', 'gt'=>0],
        'card_id' => ['integer', 'gt'=>0],
        'money' => ['integer', 'gt'=>0],
        'type' => ['in'=>'alipay,bank'],
 		'account' => ['min'=>2],
 		'name' => ['min'=>2],
 		'number' => ['length'=>19],
 		'status' => ['in'=>'1'],
    ];
    protected $message = [];
    protected $scene = [
        'applyDrawwith' => ['user_id','type','card_id','money'],
        'check_card_info' => [
        	'id'=> ['require','integer', 'gt'=>0],
        	'user_id' => ['require','integer', 'gt'=>0],
        	'account' => ['require','min'=>2],
	 		'name' => ['require','min'=>2],
	 		'number' => ['require','length'=>19],
	 		'status' => ['require','in'=>'1'],
        ],
        'check_user_info' => [
        	'name' => ['require','min'=>2],
        ],
        'withdrawList' => ['user_id','status'=> ['in'=>'0,1,2,3,4'],'page','listRows'],
        'auditWithdraw' => ['id', 'status' => ['in'=>'1,2'], 'review_id'],
        'auditTransfer' => ['id', 'status' => ['in'=>'3,4'], 'transfer_id'],
    ];
}
